<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>删除子节点.removeChild</title>

<script type="text/javascript">
    window.onload=function(){
        var oUl=document.getElementById('ul1');
        var aA=document.getElementsByTagName('a');
        
        for(var i=0;i<aA.length;i++){
            aA[i].onclick=function(){
                oUl.removeChild(this.parentNode);
            };
        }
    };
</script>    
</head>
<body>
    <ul id="ul1">
            <li>11111<a href="javascript:;">删除</a></li>  
            <li>22222<a href="javascript:;">删除</a></li>  
            <li>33333<a href="javascript:;">删除</a></li>  
            <li>44444<a href="javascript:;">删除</a></li>  
            <li>55555<a href="javascript:;">删除</a></li>  
    </ul>
</body>
</html>